import { deleteBodyRequest, deleteRequest, getRequest, postRequest, putRequest } from '@/utils/request.js'

export const resourceApi = {
  materialPage: (data) => {
    return getRequest('/v1/admin/material/page', data)
  },
  materialView: (data) => {
    return getRequest('/v1/admin/material/view', data)
  },
  materialEdit: (data) => {
    return putRequest('/v1/admin/material/edit', data)
  },
  materialSort: (data) => {
    return putRequest('/v1/admin/material/sort', data)
  },
  materialUpdateStatus: (data) => {
    return putRequest('/v1/admin/material/update/status', data)
  },
  materialDelete: (data) => {
    return deleteRequest('/v1/admin/material/delete', data)
  },
  materialBatchDelete: (data) => {
    return deleteBodyRequest('/v1/admin/material/batch/delete', data)
  },
  materialBatchEdit: (data) => {
    return putRequest('/v1/admin/material/batch/edit', data)
  },
  materialPreview: (data) => {
    return getRequest('/v1/admin/material/preview', data)
  }
}
